<ion-view view-title="发货">
	<ion-nav-bar ng-class="baseclass">
		<ion-nav-back-button></ion-nav-back-button>
	</ion-nav-bar>
	
	<ion-content>
		<div class="list">
			<li class="item item-divider font-large-my">
				<i class="icon ion-android-contact positive"></i>&nbsp;收货信息
			</li>
			<li class="item item-text-wrap padding">
				<p>收货人： {{order.consignee.name}}</p>
				<p>手机：{{order.consignee.mobile}}</p>
				<p>收货人邮编：{{order.consignee.zip}}</p>
				<p><i class="icon ion-ios-location assertive"></i>收货地址： {{order.consignee.addr}}</p>
			</li>

			<li class="item item-divider font-large-my">
				<i class="icon ion-bag positive"></i>&nbsp;商品信息
			</li>
			<!--<li class="item item-input font-large-my font-gray-my" on-tap="onshow_first(order.member_id)">
    			<i class="icon ion-home"></i>&nbsp;{{order.store_name}} >>
    		</li>-->
			<div ng-repeat="goods in order.order_objects"><!--该订单有多少个商品-->
				<li class="item item-thumbnail-left" ng-class="{'item-borderless':$first}" style="padding-right:5px;">
					<img src="{{goods.image}}" ng-if="goods.image" on-tap="onshow_productdetail(goods.goods_id)" />
					<img src="{{noImg}}" ng-if="goods.image==''||goods.image==null" on-tap="onshow_productdetail(goods.goods_id)" />
					<p on-tap="onshow_productdetail(goods.goods_id)">{{goods.name}}</p>
					<p class="font-middle-my">{{goods.bn}}</p>
					<p class="font-middle-my">
						<span class="assertive">{{goods.price|currency:'￥'}}</span>
						<span class="margin-left-10-my">库存：{{goods.store}}</span>
						<span class="right-zhang">购买量：<span class="assertive">{{goods.count}}</span></span>
					</p>
					<p class="font-middle-my">
						已发货：<span class="assertive">{{goods.delivery}}</span>
						<input type="number" placeholder="发货数量" class="right-zhang font-middle-my padding-left-5-my sendNumInput" value="{{goods.count-goods.delivery}}" style="width:30%;height: 20px;border: 1px solid #f60;" ng-if="goods.count>goods.delivery" />
						<span class="right-zhang" ng-if="goods.count>goods.delivery">发货数量：</span>
					</p>
				</li>
				<!--配件-->
				<li class="item item-thumbnail-left" style="padding-right:5px;border-top: 1px solid #DDDDDD;" ng-repeat="adjunct in goods.adjunct">
					<img src="{{adjunct.thumbnail_pic}}" on-tap="onshow_product(adjunct.goods_id,adjunct.goods_type)" ng-if="adjunct.thumbnail_pic" style="margin-left: 5%;max-width: 60px;max-height: 60px;" />
					<img src="{{noImg}}" on-tap="onshow_product(adjunct.goods_id,adjunct.goods_type)" ng-if="adjunct.thumbnail_pic==''||adjunct.thumbnail_pic==null" style="margin-left: 5%;max-width: 60px;max-height: 60px;" on-tap="onShow_detail(adjunct.goods_id)" />
					<p on-tap="onshow_productdetail(adjunct.goods_id)"><span class="positive">{{adjunct.name}}</span></p>
					<p class="font-middle-my">{{adjunct.bn}}</p>
					<p class="font-middle-my">
						<span class="assertive">{{adjunct.price|currency:'￥'}}</span>
						<span class="margin-left-10-my">库存：{{adjunct.store}}</span>
						<span class="right-zhang">购买量：<span class="assertive">{{adjunct.quantity}}</span></span>
					</p>
					<p class="font-middle-my">
						已发货：<span class="assertive">{{adjunct.delivery}}</span>
						<input type="number" placeholder="发货数量" class="right-zhang font-middle-my padding-left-5-my" value="{{adjunct.quantity}}" ng-model="form.num[$index]" style="width:30%;height: 20px;border: 1px solid #f60;" ng-if="goods.count>goods.delivery" />
						<span class="right-zhang" ng-if="goods.count>goods.delivery">发货数量：</span>
					</p>
				</li>
			</div>
			<li class="item item-divider font-large-my">
				<i class="icon ion-clipboard positive"></i>&nbsp;订单信息
			</li>
			<li class="item padding">
				<p class="font-middle-my">订单号： {{order.order_id}}</p>
				<p class="font-middle-my">订单总额：<span class="assertive">{{order.total_amount | currency:'¥'}}</span></p>
				<p class="font-middle-my" ng-repeat="pmt in order.order_pmt"><span ng-class="{'light':!$first}">优惠方式：</span>{{pmt.pmt_describe}}</p>
				<p class="font-middle-my">
					订单状态：
					<span class="assertive" ng-if="order.pay_status==0">未支付</span>
					<span class="positive" ng-if="order.pay_status==1">已支付</span>
					<span class="energized" ng-if="order.pay_status==2">已付款至到担保方</span>
					<span class="calm" ng-if="order.pay_status==3">部分付款</span>
					<span class="royal" ng-if="order.pay_status==3">部分退款</span>
					<span class="assertive" ng-if="order.pay_status==5">全部付款</span>
				</p>
				<p class="font-middle-my">运费：{{order.cost_shipping | currency:'¥'}}</p>
				<p class="font-middle-my">创建时间： {{order.createtime}}</p>
			</li>
		</div>

		<!--只有"未发货"和"部分发货"显示-->
		<div class="list" ng-if="buttonId==4">
				<div class="item item-input item-select" data-tap-disabled="true" style="padding:0 30px 0 15px;">
						<div class="input-label">快递公司：</div>
						<div class="input-value" ng-click="doSelectComp()">{{form.logi_select.comp_name}}</div>
					</div>
					<div class="item item-input item-select" data-tap-disabled="true" style="padding:0 30px 0 15px;">
							<div class="input-label">发货地址：</div>
							<div class="input-value" ng-click="doSelectAddress()">{{form.deladdress_select.addr}}</div>
						</div>
			<li class="item item-input font-large-my">
				快递单号：
				<input type="text" placeholder="请输入快递单号" ng-model="form.logi_no" />
			</li>
		</div>
		<div class="padding">
			<button class="button button-block button-shop" on-tap="confirmSend()">确认发货</button>
		</div>

	</ion-content>
</ion-view>